#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
my $ref;
my $element;

$ref = [ 1, 2, [  10, 20 ] ];
my $var = $ref->[2]->[1]; #This is very important, So I am pointing to the inside array here and that is the 2nd element hence $ref->[2], and then inside array element 2 there are more elements 0 and 1, so I can point to either one from there. Very Important!!

# we can also write this like $ref->[2][1]
print "$var\n";
